package com.ingrun.tuboshu.utils.params;

import com.github.pagehelper.PageInfo;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Setter
@Getter
public class PageHelperList<T> {
    private long total;
    private List<T> rows;

    public PageHelperList(List<T> list) {
        PageInfo<T> tPageInfo = new PageInfo<>(list);
        this.total = tPageInfo.getTotal();
        this.rows = list;
    }

    public PageHelperList(List<T> list, int total) {
        this.total = total;
        this.rows = list;
    }


}
